<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>3秒后执行</p>
    <p></p>
    <script>
        function a(){
             document.getElementsByTagName('p')[1].innerHTML='执行完成';
        }
        setTimeout(print,3000);
    </script>
</body>
</html>